<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>查询内容</title>
		<link rel="stylesheet" type="text/css" href="{$webSite}public/css/base.css">
	
	</head>
	
	<style>
		.detail{
			width:960px;
			min-height:400px;
			margin:0 auto;
		}
	
	
		/**********	评论内容顶部 detail_content_top 区域	************/
		.detail_content_top{
			width:960px;
			height:30px;
			border-top:1px #ccc solid;
		}
		.detail_content_top_font_0 a{
			width:60px;
			color:#336699;
			float:left;
			text-align:center;
			margin-top:8px;
			margin-left:10px;
		}
		.detail_content_top_font a{
			width:40px;
			color:#336699;
			float:left;
			text-align:center;
			margin-left:5px;
			margin-top:8px;
		}
		.detail_content_top_border{
			width:1px;
			height:12px;
			background:#ccc;
			float:left;
			margin-left:5px;
			margin-top:10px;
		}
		/**********	评论内容 detail_content 区域	************/
		.detail_content{
			width:960px;
			min-height:350px;
			border:1px #ccc solid;
		}
		/**********	评论内容 detail_content_left 左侧用户信息    *********/
		.detail_content_left{
			width:160px;
			min-height:300px;
			//background:pink;
			border-right:1px solid #ccc;
			border-bottom:1px solid #ccc;
			float:left;

		}
		.detail_content_left ul{
			width:160px;
			height:50px;
			
		}
		.detail_content_left_read{
			width:60px;
			height:40px;
			text-align:center;
			line-height:40px;
			float:left;
			margin-left:10px;
		}
		.detail_content_left_border{
			width:1px;
			height:12px;
			background:#ccc;
			margin-top:15px;
			margin-left:5px;
			float:left;
		}
		.detail_content_left_reply{
			width:60px;
			height:40px;
			text-align:center;
			line-height:40px;
			margin-left:5px;
			float:left;
		}
		.detail_content_left ul li span{
			color:red;
			font-weight:bold;
		}

		.detail_content_left_user{
			width:160px;
			height:45px;
			border-bottom:1px #ccc dashed;
			
		}
		.detail_content_left_user div{
			width:100px;
			height:45px;
			text-align:center;
			line-height:45px;
			margin-left:20px;
			font-weight:bold;
		}
		.detail_content_left_pic{
			width:160px;
			height:120px;
			margin-top:10px;	
			
		}
		.detail_content_left_pic img{
			display:block;
			width:120px;
			height:120px;
			margin:0 auto;

		}
		
		.detail_content_left_type{
			width:160px;
			height:30px;
			color:red;
			line-height:30px;
			
		}
		.detail_content_left_level{
			width:160px;
			height:30px;
			line-height:30px;
			
		}
		.detail_content_left_grade{
			width:160px;
			height:30px;
			line-height:30px;
			
		}

		.detail_content_left_level span ,.detail_content_left_grade span {
			font-weight:bold;
			color:red;
		}

		.detail_content_left_level_pic img{
			display:block;
			width:130px;
			height:50px;
			margin:0 auto;
			margin-bottom:10px;
			
		}
		/**********	评论 detail_content_right  右侧帖子详情    *********/
		.detail_content_right{
			width:758px;
			min-height:350px;
			//background:#3ed;
			margin-left:20px;
			float:left;
		}
		.detail_content_right_top1{
			width:758px;
			height:50px;
			
		}
		.detail_content_right_top1_left{
			min-width:100px;
			height:50px;
			line-height:50px;
			float:left;
			font-size:16px;
			font-weight:bold;
		}
		.detail_content_right_top1_right{
			width:50px;
			height:50px;
			line-height:50px;
			text-align:center;
			margin-left:20px;
			float:right;
		}


		.detail_content_right_top2{
			width:758px;
			height:50px;
			border-bottom:1px dashed #ccc;
		}
		
		.detail_content_right_top2_left{
			width:200px;
			height:50px;
			line-height:50px;
			float:left;
			
		}
		.detail_content_right_top2_left img{
			margin-left:5px;
		}
		.detail_content_right_top2_right{
			width:200px;
			height:50px;
			line-height:50px;
			text-align:center;
			margin-left:20px;
			float:right;
		}
		
		.detail_content_right_top2_right a , .detail_content_right_top2_right  div{
			float:left;
			margin-left:30px;
		}

		.detail_content_right_top2_right  div input{
			width:40px;

		}
		.detail_content_right_main{
			width:758px;
			min-height:200px;
		}
		.detail_content_right_locked{
			width:754px;
			height:40px;
			margin:0 auto;
			margin-top:10px;
			line-height:40px;
			border:1px red dashed;
			
		}
		.detail_content_right_locked img{
			margin-left:5px;

		}
		.detail_content_right_locked:hover{
			background:#F7F7F7;
		}
		.detail_content_right_locked  a{
			margin-left:450px;
			color:red;
			font-size:14px;	
		}
		.detail_content_right_locked  span{
			
			color:red;
			font-size:14px;
			font-weight:bold;	
		}

		.detail_content_right_content{
			
			width:758px;
			min-height:150px;
			margin:0 auto;
			margin-top:8px;
			line-height:100px;
			text-indent:2rem;
		}
	
		.detail_content_right_bottom{
			width:758px;
			height:35px;
			border-top:1px dashed #ccc;
			
		}
		.detail_content_right_bottom ul .li_left{
			float:left;
			margin-top:10px;
			margin-left:5px;
		
		}
		
		.detail_content_right_bottom ul .li_right{
			float:right;
			margin-top:10px;
			margin-right:10px;
		}
		.detail_content_right_bottom ul .li_border{
			width:1px;
			height:12px;
			background:#ccc;
			float:right;
			margin-top:12px;
			margin-right:10px;
		}
		

		/****	底部分页栏 detail_page	*****/
		.detail_page{
			width:960px;
			height:50px;
			margin:0 auto;
		}
		
		.detail_page_ul li{
			float:right;
			line-height:50px;
			margin-right:15px;
		}
		.detail_page_ul li input{
			width:30px;
			height:25px;
			float:left;
			margin-top:12px;
		}
		.detail_page_ul li span{
			
			font-weight:bold;
		}

	</style>

	<body>

		<div class="detail">
			
			<!-- 遍历的当前帖子的所有信息 -->
			{if $resDetail}
			{foreach $resDetail as $valDetail}
			
			<!-- 评论内容 detail_content 区域 -->
			<div class="detail_content clearFix">
				
				
				<div class="detail_content_left">
					<!-- 来访数据  -->
					<ul class="clearFix">
						<li class="detail_content_left_read">查看:&nbsp;<span>{$valDetail['hits']}</span></li>
						<li class="detail_content_left_border"></li>
						<li class="detail_content_left_reply">回复: &nbsp;<span>{$valDetail['replycount']}</span></li>
						
					</ul>

					<!-- 此处利用 uid 等于 authorid (用户id) -->
					{foreach $resAuthor as $valAuthor}
						{if $valAuthor['uid'] == $valDetail['authorid']}
					<!-- 用户名 -->
					<div class="detail_content_left_user">
						<div>{$valAuthor['username']}</div>
					</div>

					<!-- 头像  -->
					<div class="detail_content_left_pic">
						<img src="{$webSite}{$valAuthor['picture']}">
					</div>

					<!-- 用户身份(权限)  -->
					<div class="detail_content_left_type">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$type1=$valAuthor['usertype']==1 ? '管理员' : '普通用户' ;}</div>
					
					<!--  用户等级信息 -->
					<div class="detail_content_left_level">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;等级 : <span>{$valAuthor['levname']}</span></div>
					
					<!-- 此处利用 levname 等于 levname (用户等级) -->
					{foreach $resLevel as $valLevel}
						{if $valLevel['levname'] == $valAuthor['levname']}
					<!-- 距离下一等级的积分 -->
					<div class="detail_content_left_grade">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;距离下一级还差 <span>{$mon=$valLevel['grade'] + 201 - $valAuthor['grade'];}</span> 积分</div>

					<!-- 等级头像 -->
					<div class="detail_content_left_level_pic">

						<img src="{$webSite}{$valLevel['levpicture']}">
					</div>
						{/if}
					{/foreach}

						{/if}		
					{/foreach}

				</div>
				
				<!-- 帖子详情 -->
				<div class="detail_content_right">

					<div class="detail_content_right_top1 clearFix">
						
						<div class="detail_content_right_top1_left">{$valDetail['title']}</div>
						
					</div>
				
					<div class="detail_content_right_top2 clearFix">
						<div class="detail_content_right_top2_left"><img src="{$webSite}public/images/time.gif">&nbsp;&nbsp;发表于 {$time1=date('Y-m-d H:i:s' , $valDetail['addtime']);}</div>
						
					</div>
					
					<!-- 真正的内容 detail_content_right_main -->
					<div class="detail_content_right_main">
							
						<div class="detail_content_right_content">{$valDetail['content']}</div>
						
			
					</div>
				
				</div>

			</div>
			{/foreach}
			{/if}
		

			<!-- 分页显示 detail_page 区域 -->
			
			<div class="detail_page">
				
				<ul class="detail_page_ul clearFix">
					
					<li>
						<a href="{$webSite}index.php"><button style="color:#369;">返回站点首页</button></a>
					</li>	

					<li>
						本页 <span>{$currPage}</span>/<span>{$total=isset($total)?$total:1;}</span>页
					</li>

					<li>

						本页 <span>{$start=isset($offset)?($offset+1):0;}</span>-<span>{$end=($currPage>=$total) ? $count : ($currPage * $num);}</span> 条
					</li>

					<li>
						每页显示 <span>{$num=isset($num)?$num:0;}</span> 条
					</li>

					<li>
						共有 <span>{$count=isset($count)?$count:0;}</span> 条记录
					</li>
					
					<li>
						<a href="{$webSite}find.php?page={$total}&content={$content}">尾页</a>
					</li>

					<li>
						<a href="{$webSite}find.php?page={$next}&content={$content}">下一页</a>
					</li>

					<li>
						<a href="{$webSite}find.php?page={$prev}&content={$content}">上一页</a>
					</li>

					<li>
						<a href="{$webSite}find.php?page=1&content={$content}">首页</a>
					</li>	
					
					<form action="{$webSite}find.php" method="get" enctype=" multipart/form-data" >
					<li class="clearFix">	
						
						<input type="text" name="page" maxlength="4">
						<input type="hidden" name="content" value="{$content}">
						<input type="submit" value="GO">
					
					</li>
					</form>


				</ul>
			</div>
		</div>


		

		</div>
	</body>
</html>